import Vue from "vue";
import Router from "vue-router";
import Home from "./views/Home/Home.vue";

Vue.use(Router);

export default new Router({
  mode: 'hash',
  routes: [
    {   // 首页
      path: "/",
      name: "Home",
      component: Home,
      meta: {
        keepAlive: true,
      }
    },
    {   // 登录
      path: "/login",
      name: "Login",
      component: () => import("./views/Login/Login"),
    },
    {   // 协议
      path: "/Agreement",
      name: "Agreement",
      component: () => import("./views/Agreement/Agreement"),
    },
    {   // 不存在页面
      path: "/explain",
      name: "Explain",
      component: () => import("./views/Explain/Explain"),
    },
    {   // 职位列表
      path: "/job",
      name: "Job",
      component: () => import("./views/Job/Job"),
    },
    {   // 职位详情
      path: "/job-Detail",
      name: "Job-detail",
      component: () => import("./views/Job/Detail"),
    },
    {   // 公司详情
      path: "/company",
      name: "Company",
      component: () => import("./views/Company/Company"),
    },
    {   // 双选会详情
      path: "/choice",
      name: "Choice",
      component: () => import("./views/Choice/Choice"),
    },
    {   // 投递进度
      path: "/process",
      name: "Process",
      component: () => import("./views/Process/Process"),
    },
    {
      path: "/404",
      name: "404",
      component: () => import("./views/404/404"),
    }, {
      path: "*", // 此处需特别注意置于最底部
      redirect: "/404"
    },
  ]
});
